package cn.melonlib.cores.graphql.config.bean.impl;

import cn.melonlib.cores.graphql.config.bean.ParameterReader;
import graphql.schema.DataFetchingEnvironment;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class ListReader<ITEM> implements ParameterReader<List<ITEM>> {

    public List<ITEM> read(String fieldName, DataFetchingEnvironment env, Class<List<ITEM>> cls) throws Exception {
        return env.getArgument(fieldName);
    }
}
